﻿using UnityEngine;

namespace TPF.ObjectCache
{
    /// <summary>
    /// 保存激活对象信息的辅助类
    /// </summary>
    internal sealed class ActivatedObjectInfo
    {
        /// <summary>
        /// 对象激活的时间
        /// </summary>
        public float ActivateTime { get; set; }

        /// <summary>
        /// 对象池的标记
        /// </summary>
        public string ObjectPoolTag { get; set; }

        /// <summary>
        /// 资源名字
        /// </summary>
        public string Key { get; set; }
    }

    /// <summary>
    /// 保存存储在池中的对象信息的辅助类
    /// </summary>
    internal sealed class PooledObjectInfo
    {
        /// <summary>
        /// 对象回收的时间
        /// </summary>
        public float RecycleTime { get; set; }

        /// <summary>
        /// 对象的引用
        /// </summary>
        public GameObject GameObject { get; set; }

        /// <summary>
        /// 资源名字
        /// </summary>
        public string Key { get; set; }
    }
}